<div class="widget-box">
	<div class="widget-title">
		<span class="icon">
			<i class="icon-file"></i>
		</span>
		<h5>
			<?php if( $model->scenario==='update' ): ?>
				<?php echo Rights::getAuthItemTypeName($model->type); ?>
			<?php elseif($model->scenario==='create'): ?>
				<?php echo $this->pageTitle; ?>
			<?php else: ?>
				Manage
			<?php endif; ?>
			
		</h5>
	</div>
	<div class="widget-content nopadding">
		<?php $form=$this->beginWidget('CActiveForm', array('htmlOptions'=>array('class'=>'form-horizontal'))); ?>
			<div class="control-group">
				<?php echo $form->labelEx($model, 'name', array('class'=>'control-label')); ?>
				<div class="controls">
				<?php echo $form->textField($model, 'name', array('maxlength'=>255, 'class'=>'text-field')); ?>
				<?php echo $form->error($model, 'name'); ?>
				</div>
				<p class="hint"><?php echo Rights::t('core', 'Do not change the name unless you know what you are doing.'); ?></p>
			</div>
			<div class="control-group">
				<?php echo $form->labelEx($model, 'description', array('class'=>'control-label')); ?>
				<div class="controls">
				<?php echo $form->textField($model, 'description', array('maxlength'=>255, 'class'=>'text-field')); ?>
				<?php echo $form->error($model, 'description'); ?>
				</div>
				<p class="hint"><?php echo Rights::t('core', 'A descriptive name for this item.'); ?></p>
			</div>

			<?php if( Rights::module()->enableBizRule===true ): ?>
			<div class="control-group">
				<?php echo $form->labelEx($model, 'bizRule', array('class'=>'control-label')); ?>
				<div class="controls">
				<?php echo $form->textField($model, 'bizRule', array('maxlength'=>255, 'class'=>'text-field')); ?>
				<?php echo $form->error($model, 'bizRule'); ?>
				</div>
				<p class="hint"><?php echo Rights::t('core', 'Code that will be executed when performing access checking.'); ?></p>
			</div>

			<?php endif; ?>

			<?php if( Rights::module()->enableBizRule===true && Rights::module()->enableBizRuleData ): ?>
				<div class="control-group">
					<?php echo $form->labelEx($model, 'data', array('class'=>'control-label')); ?>
					<div class="controls">
					<?php echo $form->textField($model, 'data', array('maxlength'=>255, 'class'=>'text-field')); ?>
					<?php echo $form->error($model, 'data'); ?>
					</div>
					<p class="hint"><?php echo Rights::t('core', 'Additional data available when executing the business rule.'); ?></p>
				</div>

			<?php endif; ?>

			<div class="form-actions">
				<?php echo CHtml::submitButton(Rights::t('core', 'Save'), array('class'=>'btn btn-primary')); ?>  <?php echo CHtml::link(Rights::t('core', 'Cancel'), Yii::app()->user->rightsReturnUrl, array('class'=>'btn btn-primary')); ?>
			</div>

		<?php $this->endWidget(); ?>
	</div>
</div>